1 from oxsConfig
import ttk
, W
, E
, Spinbox
,fAddFields
, addFieldsExist
2 from oxsConfig
import fillTest1VarioTemperatureVar
, fillTest2VarioTemperatureVar
, fillTest3VarioTemperatureVar
,\
3 fillTest3ExpectedAltitudeVar
, fillTest3ExpectedAltitudeChanged
, fFillTest3ExpectedAltitude
, expAltTimeVar
,\
4 fillTest123LinearAccVar
, fillTest12VspeedAltVar
, fillTest1DteVar
, fillTest2PpmAirspeedCompVar
,\
5 fillTest1YawRateVar
, fillTest1HeadingVar
, fillTest123FlowVar
, fillTest1GpsNbrSatVar
, fillTest2GpsHdopVar
7 #define FILL_TEST_3_WITH_EXPECTED_ALT // uncomment this line if oXs has to calculate an expected Alt in the future based on current Alt, Vspeed and vertical Acc
8 #define EXPECTED_ALT_AT_SEC 0.2 // time (in sec) for expected Alt (this line must be uncommented wen previous is uncommented
10 #define FILL_TEST_1_2_3_WITH_LINEAR_ACC // uncomment this line if oXs has to fill TEST_1, TEST_2, TEST_3 with linear Acc
12 #define FILL_TEST_1_2_WITH_VSPEED_AND_ALT_FROM_SECOND_VARIO // uncomment to activate this option
14 #define FILL_TEST_1_WITH_DTE // uncomment to activate this option
16 #define FILL_TEST_2_WITH_PPM_AIRSPEED_COMPENSATION // uncomment to activate this option
18 #define FILL_TEST_1_WITH_YAWRATE // uncomment to activate this option
20 #define FILL_TEST1_WITH_HEADING_FROM_MAGNETOMETER // uncomment to activate this option
22 #define FILL_TEST_1_2_3_WITH_FLOW_SENSOR_CONSUMPTION // uncomment to activate this option
24 #define FILL_TEST1_WITH_GPS_NUMBER_OF_SAT // uncomment to activate this option; note: when there is a GPS fix 3D (or higher), then number of sat is increased by 100
26 #define FILL_TEST2_WITH_GPS_HDOP // uncomment to activate this option
28 #define FILL_TEST_1_WITH_VARIO_TEMP // uncomment to activate this option
30 ttk
.Checkbutton(fAddFields
, text
='Fill Test_3 with expected altitude', variable
=fillTest3ExpectedAltitudeVar
, command
=fillTest3ExpectedAltitudeChanged
,
31 onvalue
='On', offvalue
='Off').grid(row
=4, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
33 ttk
.Label(fFillTest3ExpectedAltitude
, text
="Exp.Alt to be calculated for" ).grid(column
= 0, row
=4, padx
= 1 )
34 expAltTimeBox
= Spinbox(fFillTest3ExpectedAltitude
, from_
=0.2, to
=5.0, textvariable
=expAltTimeVar
,
35 increment
= '0.1', width
=4)
36 expAltTimeBox
.grid(column
=1, row
=5 , padx
=10)
37 ttk
.Label(fFillTest3ExpectedAltitude
, text
="sec in the future" ).grid(column
= 2, row
=4, padx
= 1 )
39 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 2 3 with linear Acc', variable
=fillTest123LinearAccVar
,
40 onvalue
='On', offvalue
='Off').grid(row
=6, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
42 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 2 with Vspeed and Alt from second sensor', variable
=fillTest12VspeedAltVar
,
43 onvalue
='On', offvalue
='Off').grid(row
=7, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
46 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 with dtE (total energy vario)', variable
=fillTest1DteVar
,
47 onvalue
='On', offvalue
='Off').grid(row
=8, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
49 ttk
.Checkbutton(fAddFields
, text
='Fill Test_2 with PPM airspeed compensation', variable
=fillTest2PpmAirspeedCompVar
,
50 onvalue
='On', offvalue
='Off').grid(row
=9, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
52 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 with Yaw rate', variable
=fillTest1YawRateVar
,
53 onvalue
='On', offvalue
='Off').grid(row
=10, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
55 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 with Heading (from magnetometer)', variable
=fillTest1HeadingVar
,
56 onvalue
='On', offvalue
='Off').grid(row
=11, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
58 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 2 3 with Flow sensor consumption', variable
=fillTest123FlowVar
,
59 onvalue
='On', offvalue
='Off').grid(row
=12, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
61 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 with number of satellites', variable
=fillTest1GpsNbrSatVar
,
62 onvalue
='On', offvalue
='Off').grid(row
=13, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
64 ttk
.Checkbutton(fAddFields
, text
='Fill Test_2 with GPS HDOP', variable
=fillTest2GpsHdopVar
,
65 onvalue
='On', offvalue
='Off').grid(row
=14, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
67 ttk
.Checkbutton(fAddFields
, text
='Fill Test_1 with vario temperature', variable
=fillTest1VarioTemperatureVar
,
68 onvalue
='On', offvalue
='Off').grid(row
=15, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
70 ttk
.Checkbutton(fAddFields
, text
='Fill Test_2 with vario temperature', variable
=fillTest2VarioTemperatureVar
,
71 onvalue
='On', offvalue
='Off').grid(row
=16, sticky
=(W
,E
), padx
=20 , pady
=(20,2))
73 ttk
.Checkbutton(fAddFields
, text
='Fill Test_3 with vario temperature', variable
=fillTest3VarioTemperatureVar
,
74 onvalue
='On', offvalue
='Off').grid(row
=17, sticky
=(W
,E
), padx
=20 , pady
=(20,2))